home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 January / january_2001.iso / intercd / root / ^4Developers / VB / visbasdb / VBDB / VBDB Code / VB6 Code / Class 6 / Example6-3AD.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-14  |  6.6 KB  |  212 lines

  1. VERSION 5.00
  2. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  3. Begin VB.Form frmAuthors 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Authors"
  6.    ClientHeight    =   2625
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   4680
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2625
  14.    ScaleWidth      =   4680
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton cmdDone 
  17.       Caption         =   "Do&ne"
  18.       Height          =   375
  19.       Left            =   3240
  20.       TabIndex        =   13
  21.       Top             =   2160
  22.       Width           =   1215
  23.    End
  24.    Begin VB.CommandButton cmdDelete 
  25.       Caption         =   "&Delete"
  26.       Height          =   375
  27.       Left            =   1680
  28.       TabIndex        =   12
  29.       Top             =   2160
  30.       Width           =   1215
  31.    End
  32.    Begin VB.CommandButton cmdEdit 
  33.       Caption         =   "&Edit"
  34.       Height          =   375
  35.       Left            =   120
  36.       TabIndex        =   11
  37.       Top             =   2160
  38.       Width           =   1215
  39.    End
  40.    Begin VB.CommandButton cmdCancel 
  41.       Caption         =   "&Cancel"
  42.       Height          =   375
  43.       Left            =   3240
  44.       TabIndex        =   10
  45.       Top             =   1680
  46.       Width           =   1215
  47.    End
  48.    Begin VB.CommandButton cmdSave 
  49.       Caption         =   "&Save"
  50.       Height          =   375
  51.       Left            =   1680
  52.       TabIndex        =   9
  53.       Top             =   1680
  54.       Width           =   1215
  55.    End
  56.    Begin VB.CommandButton cmdAddNew 
  57.       Caption         =   "&Add New"
  58.       Height          =   375
  59.       Left            =   120
  60.       TabIndex        =   8
  61.       Top             =   1680
  62.       Width           =   1215
  63.    End
  64.    Begin VB.CommandButton cmdNext 
  65.       Caption         =   "Next =>"
  66.       Height          =   255
  67.       Left            =   2520
  68.       TabIndex        =   7
  69.       Top             =   1320
  70.       Width           =   1215
  71.    End
  72.    Begin VB.CommandButton cmdPrevious 
  73.       Caption         =   "<= Previous"
  74.       Height          =   255
  75.       Left            =   1080
  76.       TabIndex        =   6
  77.       Top             =   1320
  78.       Width           =   1215
  79.    End
  80.    Begin VB.TextBox txtYearBorn 
  81.       DataField       =   "Year Born"
  82.       DataSource      =   "datAuthors"
  83.       Height          =   285
  84.       Left            =   1200
  85.       Locked          =   -1  'True
  86.       TabIndex        =   3
  87.       Text            =   "Text3"
  88.       Top             =   840
  89.       Width           =   1215
  90.    End
  91.    Begin VB.TextBox txtAuthor 
  92.       DataField       =   "Author"
  93.       DataSource      =   "datAuthors"
  94.       Height          =   285
  95.       Left            =   1200
  96.       Locked          =   -1  'True
  97.       TabIndex        =   2
  98.       Text            =   "Text2"
  99.       Top             =   480
  100.       Width           =   3375
  101.    End
  102.    Begin VB.TextBox txtAuthorID 
  103.       DataField       =   "Au_ID"
  104.       DataSource      =   "datAuthors"
  105.       Height          =   285
  106.       Left            =   1200
  107.       Locked          =   -1  'True
  108.       TabIndex        =   1
  109.       Text            =   "Text1"
  110.       Top             =   120
  111.       Width           =   1215
  112.    End
  113.    Begin MSAdodcLib.Adodc datAuthors 
  114.       Height          =   330
  115.       Left            =   2520
  116.       Top             =   120
  117.       Visible         =   0   'False
  118.       Width           =   2055
  119.       _ExtentX        =   3625
  120.       _ExtentY        =   582
  121.       ConnectMode     =   0
  122.       CursorLocation  =   3
  123.       IsolationLevel  =   -1
  124.       ConnectionTimeout=   15
  125.       CommandTimeout  =   30
  126.       CursorType      =   3
  127.       LockType        =   3
  128.       CommandType     =   1
  129.       CursorOptions   =   0
  130.       CacheSize       =   50
  131.       MaxRecords      =   0
  132.       BOFAction       =   0
  133.       EOFAction       =   0
  134.       ConnectStringType=   1
  135.       Appearance      =   1
  136.       BackColor       =   -2147483643
  137.       ForeColor       =   -2147483640
  138.       Orientation     =   0
  139.       Enabled         =   -1
  140.       Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\VBDB\Working\Biblio.mdb"
  141.       OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\VBDB\Working\Biblio.mdb"
  142.       OLEDBFile       =   ""
  143.       DataSourceName  =   ""
  144.       OtherAttributes =   ""
  145.       UserName        =   ""
  146.       Password        =   ""
  147.       RecordSource    =   "SELECT * FROM Authors ORDER BY Author"
  148.       Caption         =   "Adodc1"
  149.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  150.          Name            =   "MS Sans Serif"
  151.          Size            =   8.25
  152.          Charset         =   0
  153.          Weight          =   400
  154.          Underline       =   0   'False
  155.          Italic          =   0   'False
  156.          Strikethrough   =   0   'False
  157.       EndProperty
  158.       _Version        =   393216
  159.    End
  160.    Begin VB.Label Label3 
  161.       Caption         =   "Year Born"
  162.       Height          =   255
  163.       Left            =   120
  164.       TabIndex        =   5
  165.       Top             =   840
  166.       Width           =   1215
  167.    End
  168.    Begin VB.Label Label2 
  169.       Caption         =   "Author Name"
  170.       Height          =   255
  171.       Left            =   120
  172.       TabIndex        =   4
  173.       Top             =   480
  174.       Width           =   1215
  175.    End
  176.    Begin VB.Label Label1 
  177.       Caption         =   "Author ID"
  178.       Height          =   255
  179.       Left            =   120
  180.       TabIndex        =   0
  181.       Top             =   120
  182.       Width           =   1215
  183.    End
  184. Attribute VB_Name = "frmAuthors"
  185. Attribute VB_GlobalNameSpace = False
  186. Attribute VB_Creatable = False
  187. Attribute VB_PredeclaredId = True
  188. Attribute VB_Exposed = False
  189. Option Explicit
  190. Private Sub cmdDelete_Click()
  191. Dim Response As Integer
  192. Response = MsgBox("Are you sure you want to delete this record?", vbYesNo + vbQuestion + vbDefaultButton2, "Delete")
  193. If Response = vbNo Then
  194.   Exit Sub
  195. End If
  196. End Sub
  197. Private Sub cmdNext_Click()
  198. datAuthors.Recordset.MoveNext
  199. If datAuthors.Recordset.EOF Then
  200.   datAuthors.Recordset.MoveLast
  201. End If
  202. End Sub
  203. Private Sub cmdPrevious_Click()
  204. datAuthors.Recordset.MovePrevious
  205. If datAuthors.Recordset.BOF Then
  206.   datAuthors.Recordset.MoveFirst
  207. End If
  208. End Sub
  209. Private Sub cmdSave_Click()
  210. MsgBox "Record saved.", vbOKOnly + vbInformation, "Save"
  211. End Sub
  212.